package services

import "mishop/models"

type ITradeService interface {
	FindByID(product_id uint) (*models.Trade, error)
	FindByTradeID(page, rows int, category_id uint) (models.Pages, error)
}
type TradeService struct {
	model models.ITrade
}

func (p *TradeService) FindByID(product_id uint) (*models.Trade, error) {
	return p.model.FindByID(product_id)
}

func (p *TradeService) FindByTradeID(page, rows int, category_id uint) (models.Pages, error) {
	return p.model.FindByTradeID(page, rows, category_id)
}

func NewTradeService(model models.ITrade) ITradeService {
	return &TradeService{model: model}
}
